package com.auth.domain.service;

import com.auth.domain.module.po.authmanage.UserRole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.auth.control.model.UserRoleDto;
import com.auth.domain.module.vo.authmanage.RoleVO;

import java.util.List;

/**
 * <p>
 * 用户角色表 服务类
 * </p>
 *
 * @author cyj
 * @since 2020-10-21
 */
public interface IUserRoleService extends IService<UserRole> {

    /**
     * Remove by user id boolean
     *
     * @param userId user id
     * @return the boolean
     * @description: 删除userId下的所有角色
     */
    boolean removeByUserId(Long userId);

    /**
     * Gets by user id *
     *
     * @param userId user id
     * @return the by user id
     * @description: 获取userId的所有角色
     */
    List<UserRole> getByUserId(Long userId);

    void saveUserRoles(Long userId, List<UserRoleDto> userRoleDtos);

    List<RoleVO> getUserRoles(Long userId);
}
